package com.bmadmin.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bmadmin.domain.NormalResult;
import com.bmadmin.domain.XtqxDomain;
import com.bmadmin.mapper.SjkCxDao;
import com.bmadmin.mapper.XtqxDao;
import com.bmadmin.service.XtqxService;
@Service
@Transactional
public class XtqxServiceImpl implements XtqxService {
	@Autowired
	XtqxDao xtqxDao;
	
	public List<XtqxDomain> getXtqxList(Map map){
		return xtqxDao.getXtqxList(map);
	}
	
	public int insertXtqx(XtqxDomain xtqxDomain){
		return xtqxDao.insertXtqx(xtqxDomain);
	}
	
	public NormalResult deleteXtqx(String req_id){
		NormalResult result = new NormalResult();
        int deleteResult = xtqxDao.deleteXtqx(req_id);
        if(deleteResult==1){
            result.setCode("0000");
            result.setMsg("删除成功");
        }else{
            result.setCode("9999");
            result.setMsg("删除失败");
        }
        return result;
	}
	
	public int updateXtqx(XtqxDomain xtqxDomain){
		return xtqxDao.updateXtqx(xtqxDomain);
	}
	
	public NormalResult upXtqx(XtqxDomain xtqxDomain){
		NormalResult result = new NormalResult();
        int deleteResult = xtqxDao.upXtqx(xtqxDomain);
        if(deleteResult==1){
            result.setCode("0000");
            result.setMsg("提交成功");
        }else{
            result.setCode("9999");
            result.setMsg("提交失败");
        }
        return result;
	}
	
	public NormalResult sureXtqx(XtqxDomain xtqxDomain){
		NormalResult result = new NormalResult();
        int deleteResult = xtqxDao.sureXtqx(xtqxDomain);
        if(deleteResult==1){
            result.setCode("0000");
            result.setMsg("确认成功");
        }else{
            result.setCode("9999");
            result.setMsg("确认失败");
        }
        return result;
	}
	
	public int verifyXtqx(XtqxDomain xtqxDomain){
		return xtqxDao.verifyXtqx(xtqxDomain);
	}
	
	public int disposeXtqx(XtqxDomain xtqxDomain){
		return xtqxDao.disposeXtqx(xtqxDomain);
	}
	
}
